package com.ruoyi.system.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.system.mapper.SysStudentCourseMapper;
import com.ruoyi.system.service.ISysStudentCourseService;

/**
 * 单词学习进度服务实现
 */
@Service
public class SysStudentCourseServiceImpl implements ISysStudentCourseService
{
    @Autowired
    private SysStudentCourseMapper sysStudentCourseMapper;

    @Override
    public void finishStudentCourse(Long studentId, Long courseId) {
        
        /*
         *  更新课程的完成状态
         *  只要所有单元都完成，则课程也算完成
         */
        sysStudentCourseMapper.updateCourseOfStateFinish(studentId, courseId);
    }
}